Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit event #11

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Exit event #11

wants to merge 3 commits into from

Conversation

jcristovao
Copy link

When redis is not installed, no event is called (namely close). Hence, this PR adds the exiting and exit events, which pass the exitCode and allow the developer to identify if there was a problem launching redis.

Also, when calling closing, pass the result.err to allow the user code to identify any possible error when parsing the configuration.

What do you think?
Thanks

@coveralls
Copy link

coveralls commented May 1, 2018

Coverage Status

Coverage decreased (-1.7%) to 98.347% when pulling 8cc2435 on Optylon:exitEvent into d5d04e0 on BrandonZacharie:develop.

@BrandonZacharie
Copy link
Owner

I see the need you have here and thanks for taking the time to find out what's going on. I agree that it's troublesome to see what went wrong without a hook that provides some information. However, having multiple events that could fire when the library returns control shifts burden to consumers. Rather than adding exiting and exit events, I propose the addition of an error event with which you would get an Error object as expected.

@BrandonZacharie
Copy link
Owner

An error event would also help resolve #7 since we could publish an error when logfile or any other incompatible configuration is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants